package com.example.child_protection.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 儿保卡状态
 * @author Biz
 * @date 2018-10-31
 */
public enum CardStatesEnums {

    NOT_ACTIVE("NOT_ACTIVE", "未激活"),

    READY_TO_ACTIVE("READY_TO_ACTIVE", "准备激活"),

    ACTIVE("ACTIVE", "已激活")

    ;

    private final String value;

    private final String displayName;

    private static Map<String, CardStatesEnums> valueMap;

    private CardStatesEnums(String value, String displayName) {
        this.value = value;
        this.displayName = displayName;
    }

    public CardStatesEnums getEnum(String value) {
        return (CardStatesEnums) valueMap.get(value);
    }

    public Map<String, CardStatesEnums> getAllValueMap() {
        return valueMap;
    }

    public String getValue() {
        return this.value;
    }

    public String getDisplayName() {
        return this.displayName;
    }

    static {

        valueMap = new HashMap<String, CardStatesEnums>();

        for (CardStatesEnums e : values())
            valueMap.put(e.value, e);
    }
}
